package com.example.gezihua.myapplication.touch;

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.widget.FrameLayout;

/**
 * Created by gezihua on 16-12-21.
 */

public class TouchContainer extends FrameLayout{
    public TouchContainer(Context context) {
        super(context);
    }

    public TouchContainer(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public TouchContainer(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent ev) {
        Log.e("suj","TouchContainer..................dispatchTouchEvent"+ev.toString());
        return super.dispatchTouchEvent(ev);

    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        boolean onInterceptTouchEvent = super.onInterceptTouchEvent(ev);
        Log.e("suj","TouchContainer..................onInterceptTouchEvent :"+ onInterceptTouchEvent +ev.toString());
        return onInterceptTouchEvent||true ;
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        Log.e("suj","TouchContainer..................onTouchEvent");
        return super.onTouchEvent(event);
    }
}
